<?php $memAccount = $this->Session->read('member_account'); ?>



<div class='m-t col-lg-12 b-b'>
    <h4 class='font-bold text-success'>Welcome to your online membership home!</h4>
    <p>With <b class='font-bold'>memberz</b> you can manage a single online presence and help organisations you belong to connect with you.</p>
</div>

<div class='col-lg-12 b-b bg-light lter'>
    <div style='padding: 10px 0px;'>Organisations on the platform you can connect with.</div>
</div>

<div id="organisations_public_list">
    <?php foreach ($organisations as $organisation) { ?>
        <div class="m-t col-lg-6 col-md-6 col-sm-6">

            <section class="panel clearfix bg-white lter">
                <div class="panel-body" style="padding: 10px;">
                    <a href="#" class="thumb pull-left m-r">
                        <img src="<?php echo $this->Html->url($organisation['logo']); ?>" class="img-rounded img-thumbnail" style='height: 72px;'>
                    </a>
                    <div class="clear">
                        <a href="#" class="org_name text-info font-bold"><?php echo $organisation['name']; ?></a>
                        <small class="block text-muted">
                            <?php echo $organisation['type']; ?> &nbsp; | &nbsp; 
                            <?php echo number_format($organisation['members']); ?> Members 
                            <!--&nbsp; | &nbsp; 0 Events-->
                        </small>

                        <a href="<?php echo $this->Html->url(array('action' => 'org_profile', $organisation['id'])); ?>" class="btn btn-xs btn-primary m-t-xs"><i class="fa fa-eye"></i> View</a>

                        <?php if ($organisation['public_join']) { ?>
                            <a href="<?php echo $this->Html->url(array('controller' => 'member', 'action' => 'join', $organisation['id'])); ?>" class="btn btn-xs btn-success m-t-xs join-link"><i class="fa fa-link"></i> Join</a>
                        <?php } ?>
                    </div>
                </div>
            </section>

        </div>
    <?php } ?>
</div>


<input type="hidden" id="charts-data-url" value="<?php echo $this->Html->url(array('controller' => 'charts', 'action' => 'member_stats')); ?>" />

<?php
echo $this->Html->script('charts/flot/jquery.flot.min.js');
echo $this->Html->script('charts/flot/jquery.flot.tooltip.min.js');
echo $this->Html->script('charts/flot/jquery.flot.resize.js');
echo $this->Html->script('charts/flot/jquery.flot.orderBars.js');
echo $this->Html->script('charts/flot/jquery.flot.pie.min.js');
echo $this->Html->script('charts/flot/jquery.flot.time.js');
echo $this->Html->script('app/views/members/index.js');
?>